Possible to exclude or reorder a column from `*` ?
Posted
by Earlz
on Stack Overflow
See other posts from Stack Overflow
or by Earlz
Published on 2010-05-27T00:34:46Z
Indexed on
2010/05/27
0:51 UTC
Read the original article
Hit count: 168
Is it possible to exclude a column from a select * from table
statement with SQL Server?
I have a need for this and this is my only option other than parsing a raw SQL string to get out the required field names (I really don't want to do that).
Just to be bold. When the query is made I do not have access to the list of fields needed from the table but I do know which field I do not need. This is part of a complex multi-part query.
Surely there must be some way even if it's "hackish" such as using table variables or views
My other option is to reorder the columns. My problem is with ExecuteScalar
SQL functions which get the first row and first column.
© Stack Overflow or respective owner